<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
	$(function() {
		$('#proDefAddForm').form({
			url : '${pageContext.request.contextPath}/processDefinition/add',
			onSubmit : function() {
				progressLoad();
				var isValid = $(this).form('validate');
				if (!isValid) {
					progressClose();
				}
				return isValid;
			},
			success : function(result) {
				progressClose();
				result = $.parseJSON(result);
				if (result.success) {
					parent.$.modalDialog.handler.dialog('close');
					parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
				} else {
					parent.$.messager.alert('错误', result.msg, 'error');
				}
			}
		});
	});
</script>
<div style="margin: 5px">
	<form id="proDefAddForm" method="post" enctype="multipart/form-data">
		<table cellspacing="0" cellpadding="3" border="1">
			<tbody>
				<tr bgcolor="#398EB7">
					<td colspan="2"><font color="#ffffff">档案上传表格</font></td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td width="150">
						<div align="left">
							<p>
								文件标题 <font face="Verdana"> :&nbsp; </font>
							</p>
						</div></td>
					<td width="324"><font face="Verdana"> <input type="TEXT" value="" name="fileName"  class="easyui-validatebox" data-options="required:true"/> <br> </font></td>
				</tr>
				<tr>
					<td>
						<div align="left">
							<p>
								<font face="Verdana">档案:&nbsp;</font> <br>
							</p>
						</div></td>
					<td><font face="Verdana"> <input type="file" name="fileUpload"  class="easyui-validatebox" data-options="required:true"/> <br> </font></td>
				</tr>
			</tbody>
		</table>
	</form>
</div>